<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
    <title>Voir un Enseignant</title>
</h:head>
<h:body>
    <ui:include src="entete.xhtml"/>
    <h1>Voir un Enseignant</h1>
    <hr/>
    <p:panelGrid columns="2">
            <p:outputLabel value="Nom : "/>
            <h:outputText value="#{enseignantController.selected.prenom} #{enseignantController.selected.nom}"/>
    </p:panelGrid>
    <br/>
    <p:dataTable value="#{enseignantController.selected.projets}" var="proj">
        <p:column>
            <f:facet name="header">
                <h:outputText value="Projets"/>
            </f:facet>
            <h:form>
                <p:commandLink value="#{proj.nom}" action="#{projetController.doSelect}"/>
                <input type="hidden" name="selected" value="#{proj.id}"/>
            </h:form>
        </p:column>

        <p:column>
            <f:facet name="header">
                <h:outputText value="Description"/>
            </f:facet>
            <h:outputText value="#{proj.description}"/>
        </p:column>
    </p:dataTable>
    <br/>
    <h:form>
        <p:commandButton value="Retour à la liste des enseignants" action="#{enseignantController.doCancel}"/>
    </h:form>
    <hr/>
</h:body>
</html>
